<script type="text/javascript" src="functions.js" ></script>

<input type="radio" name="question_type" id="true_false" value="true_false" onClick="show_options('true_false')">True/False
<br>
<input type="radio" name="question_type" id="multiple_choice" value="multiple_choice" onClick="show_options('multiple_choice')">Multiple Choice
<br>
<input type="radio" name="question_type" id="many_choice" value="many_choice" onClick="show_options('many_choice')">Many Choice
<br>

<!-- The true/false question information (question and answer)  -->
<div id='true_false_options' style="display:none">
    <form id='true_false_form' action="create_test.php">
        <p>Question:
            <input type="text" name="name" class="text_box_question" />
        </p>
        <input type="radio" name="true_false_answer" value="true" />True
        <input type="radio" name="true_false_answer" value="false" />False
        <br>
        <p>
            <input type="Submit"/>
        </p>
    </form>
</div>

<!-- The multiple choice question information (question, possible choices, and answer)  -->
<div id='multiple_choice_options' style="display:none">
    <form id='multiple_choice_form' action="create_test.php">
       <p>Question:
            <input type="text" name="name" class="text_box_question" id="multiple_choice_question" />
        </p>
        <input type="radio" name="multiple_choices" value="document.getElementById('answer_1').value" />1.
        <input type="text" name="name" class="text_box_answer" id="answer_1" />
        <br>
        <input type="radio" name="multiple_choices" value="document.getElementById('answer_2').value" />2.
        <input type="text" name="name" class="text_box_answer" id="answer_2" />
        <br>
        <input type="radio" name="multiple_choices" value="document.getElementById('answer_3').value" />3.
        <input type="text" name="name" class="text_box_answer" id="answer_3" />
        <br>
        <input type="radio" name="multiple_choices" value="document.getElementById('answer_4').value" />4.
        <input type="text" name="name" class="text_box_answer" id="answer_4" />
        <br> <span id="insert_multiple_choice"></span> 
        <br>
        <p>
            <input type="button" value="Add another choice" onClick="insert_multiple_choice()" />
            <input type="Submit"/>
        </p>
    </form>
</div>

<!-- The many choice question information (question, possible choices, and answer(s) )  -->
<div id='many_choice_options' style="display:none">
    <form id='many_choice_form' action="create_php">
        <p>Question:
            <input type="text" name="name" class="text_box_question" />
        </p>
        <input type="checkbox" name="many_choices" value="true" />1.
        <input type="text" name="name" class="text_box_answer" id="choice_1" />
        <br>
        <input type="checkbox" name="many_choices" value="false" />2.
        <input type="text" name="name" class="text_box_answer" id="choice_2" />
        <br>
        <input type="checkbox" name="many_choices" value="true" />3.
        <input type="text" name="name" class="text_box_answer" id="choice_3" />
        <br>
        <input type="checkbox" name="many_choices" value="false" />4.
        <input type="text" name="name" class="text_box_answer" id="choice_4" />
        <br> <span id="insert_many_choice"></span> 
        <p>
            <input type="button" value="Add another choice" onClick="insert_many_choice()" />
            <input type="Submit"/>
        </p>
    </form>
</div>
